package com.dtwave.wechat.service.provider.database.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.dtwave.wechat.service.api.dto.req.ReqUserDto;
import com.dtwave.wechat.service.provider.database.entity.UserEntity;
import com.dtwave.wechat.service.provider.dto.UserDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Auther: liuwenxiang
 * @Date: 2018/12/17 19:54
 * @Description:
 */

public interface UserMapper extends BaseMapper<UserEntity> {

    /**
     * 分页查询实验列表
     *
     * @param req
     *
     * @return
     */
    List<UserEntity> selectListByPage(ReqUserDto req);

    /**
     * 查询总数
     *
     * @param req
     *
     * @return
     */
    long selectAmount(ReqUserDto req);



    UserDto selectByPhone(String phone);


    int delUserOfficeRelation();

    int addUserOfficeRelation(@Param("userId") String userId, @Param("officeId") Integer officeId);
}
